package com.atguigu.day03.test;

import java.util.Scanner;

public class IfElseTest4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三个数进行比较");
        System.out.println("----------------------");
        System.out.println("第一个数:");
        int num1 = sc.nextInt();
        System.out.println("第二个数:");
        int num2 = sc.nextInt();
        System.out.println("第三个数:");
        int num3 = sc.nextInt();
        if(num1 > num2){
            if(num2 > num3){
                System.out.println(num1 + ">" + num2 + ">" + num3);
            }else if(num1 > num3){
                System.out.println(num1 + ">" + num3 + ">" + num2);
            }else{
                System.out.println(num3 + ">" + num1 + ">" + num2);
            }
        }else if(num2 > num1){
            if(num1 > num3){
                System.out.println(num2 + ">" + num1 + ">" + num3);
            }else if(num2 > num3){
                System.out.println(num2 + ">" + num3 + ">" + num1);
            }else{
                System.out.println(num3 + ">" + num2 + ">" + num1);
            }
        }
    }
}
